home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / os.356 < prev    next >
Text File  |  1992-02-06  |  601b  |  16 lines

  1. environ 
  2.  
  3. Q: I'm trying to reference the global "environ" from my program; unfortunately
  4. I get "undefined symbol __environ" when I try to link. Here's what I have:
  5.  
  6.     extern char **environ;
  7.  
  8. A: You are most likely linking without the crt0.o file. If you link using "ld" this file is not brought it automatically. However, if you link using "cc," it is. Just replacing "ld" with "cc" in your Makefile is usually good enough. An alternative might be to list -lcrt0.o in your "ld" line, in case you have some reason you don't want replace "ld" with "cc".
  9.  
  10. QA356
  11.  
  12. Valid for 1.0 
  13. Not checked yet for 2.0 
  14.  
  15.  
  16.